#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ""
__author__ = "Administrator"
__mtime__ = "2016/6/17"
"""
"""
私有方法---间接访问
"""
class Province:
    def __init__(self,name,capital,leader):
        self.Name = name
        self.Capital = capital
        self.Leader = leader
    def __sha(self):
        print '我是alex'
    def Foo(self):
        #调用私有方法
        self.__sha()

japan = Province('日本','东京','dog')

japan.Foo()

japan._Province__sha()    #直接调用私有方法。（不建议使用）
